package com.spl.msplayer;

import android.content.pm.ActivityInfo;

public class VideoInfo {
	
	protected String thumbId;
	
	/**
	 * @return the m_thumbId
	 */
	public String get_thumbId() {
		return thumbId;
	}
	/**
	 * @param m_thumbId the m_thumbId to set
	 */
	public void set_thumbId(String thumbId) {
		this.thumbId = thumbId;
	}
	protected String id;
	public String get_id() {
		return id;
	}
	public void set_id(String id) {
		this.id = id;
	}
	protected String title;

	public String get_title() {
		return title;
	}
	/**
	 * @param m_title the m_title to set
	 */
	public void set_title(String title) {
		this.title = title;
	}
	
	protected long duration;
	/**
	 * @return the m_duration
	 */
	public long get_duration() {
		return duration;
	}
	/**
	 * @param m_duration the m_duration to set
	 */
	public void set_duration(long duration) {
		this.duration = duration;
	}
	
	
	protected int thumbWidth;
	/**
	 * @return the m_width
	 */
	public int get_thumbWidth() {
		return thumbWidth;
	}
	/**
	 * @param m_width the m_width to set
	 */
	public void set_thumbWidth(int width) {
		this.thumbWidth = width;
	}
	
	protected int thumbHeight;
	/**
	 * @return the m_height
	 */
	public int get_thumbHeight() {
		return thumbHeight;
	}
	/**
	 * @param m_height the m_height to set
	 */
	public void set_thumbHeight(int height) {
		this.thumbHeight = height;
	}
	
	protected String dataPath;
	
	/**
	 * @return the dataPath
	 */
	public String getDataPath() {
		return dataPath;
	}
	/**
	 * @param dataPath the dataPath to set
	 */
	public void setDataPath(String dataPath) {
		this.dataPath = dataPath;
	}
	public VideoInfo(String thumbId, String id, String title, long duration, int width, int height, String path) {
		this.set_thumbId(thumbId);
		this.set_id(id);
		this.set_title(title);
		this.set_duration(duration);
		this.set_thumbWidth(width);
		this.set_thumbHeight(height);
		this.setDataPath(path);
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		String rv = "";
		rv += (thumbId + " - " + id + " - " + title + " - " + duration + " - " + thumbWidth + " - " + thumbHeight);
		return rv;
	}
	
	//0 portrait 1 lanscape
	public int getOrientation() {
		if(this.get_thumbWidth() > this.get_thumbHeight())
			return ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
		else 
			return ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
		
	}
	
}
